package uk.co.hs.web.initializer;


/**
 * A Controllable is started by the Controller as the application starts  and
 * is shutdown when the Controller is shut down.  The Controller may
 * pause and resume the Controllable between start up and shut down.
 *
 * Note that a Controllable must be started in a paused state.
 */
public interface Controllable
{
  /**
   * The order gives the order in which a controllable should be started and
   * stopped - lower get started first and stopped last
   */
  int order();

  /**
   * Starts the Controllable
   */
  void start();

  /**
   * Shuts down the Controllable
   */
  void shutdown();


}
